package org.yaonan.dao;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.yaonan.bean.YnMessage;
import org.yaonan.bean.YnMessageExample;
import org.yaonan.bean.YnUser;

public interface YnMessageMapper {
    int countByExample(YnMessageExample example);

    int deleteByExample(YnMessageExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(YnMessage record);

    int insertSelective(YnMessage record);

    List<YnMessage> selectByExample(YnMessageExample example);

    YnMessage selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") YnMessage record, @Param("example") YnMessageExample example);

    int updateByExample(@Param("record") YnMessage record, @Param("example") YnMessageExample example);

    int updateByPrimaryKeySelective(YnMessage record);

    int updateByPrimaryKey(YnMessage record);
    
    List<YnUser> selectMessageByUserid(Integer userid);
    
    List<YnMessage> selectMessageByFriendid(Integer userid, Integer friendid, Integer count);
    
    void deleteMessage(Integer userid, Integer friendid);
    
    int selectMessageCount(Integer userid);
    
    Date selectNewMessageTime(Integer userid);
    
    void updateNewMessageRead(Integer userid, Integer friendid);
    
    List<YnMessage> selectGetNewMessage(Integer userid, Integer friendid);
}